package com.cus.tom.transfer.ac;

import android.os.Bundle;

import com.cus.tom.transfer.R;
import com.cus.tom.transfer.frag.BaseDialogFragment;
import com.cus.tom.transfer.frag.TipDlg;
import com.jwsd.libzxing.activity.CaptureActivity;
import com.plata.base.aclr.utils.NetworkUtils;

public class ScanAct extends CaptureActivity {

    @Override
    protected int getLayout() {
        return R.layout.activity_scan;
    }

    @Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        if (!NetworkUtils.isWifi(this)) {
            TipDlg dlg = new TipDlg().setMsg("请连接WIFI").setOk("确定");
            dlg.setOnDismissListener(new BaseDialogFragment.OnDismissListener() {
                @Override
                public void onDismiss(boolean isOk, Object value) {
                    finish();
                }
            });
            dlg.show(getSupportFragmentManager(), "");
        }
    }
}
